package com.org.cys.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.org.cys.dao.IGeneralDao;
import com.org.cys.pojo.Page;
import com.org.cys.service.I${objName}Service;
import com.org.cys.util.PageData;


@Service("${objName2}Service")
public class ${objName}Service implements I${objName}Service {
  
  @Resource
  private IGeneralDao generalDao;
  
  @Override
  public PageData get${objName}ById(PageData pd) throws Exception {
	  return (PageData) generalDao.findForObject("${objName}Mapper.findById", pd);
  }
  
  @Override
  public void save(PageData pd) throws Exception{
	  generalDao.save("${objName}Mapper.save",pd);
  }
  
  @Override
  public void update(PageData pd) throws Exception{
	  generalDao.update("${objName}Mapper.update",pd);
  }
  
  @Override
  public void delete(PageData pd) throws Exception{
	  generalDao.delete("${objName}Mapper.delete", pd);
  }
  
  @Override
  public List<PageData> dataList(Page page) throws Exception{
	  return (List<PageData>) generalDao.findForList("${objName}Mapper.dataListPage", page);
  }
  
  @Override
  public List<PageData> listAll(PageData pd) throws Exception{
	  return (List<PageData>) generalDao.findForList("${objName}Mapper.listAll", pd);
  }
  
  @Override
  public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
	  generalDao.delete("${objName}Mapper.deleteAll", ArrayDATA_IDS);
  }
  
  
}